package com.xmkj.bearuser.membercenter.adapter;

import android.content.Context;

import com.common.retrofit.bean.ChuZhiDetailsBean;
import com.common.widget.recyclerview.refresh.adapter.CommonAdapter;
import com.common.widget.recyclerview.refresh.adapter.ViewHolder;
import com.xmkj.bearuser.R;

import java.util.List;

/**
 * Create by leo
 * 创建日期：2018/7/16
 * 描述：
 */

public class ChuZhiAdapter extends CommonAdapter<ChuZhiDetailsBean> {
    public ChuZhiAdapter(Context context, List<ChuZhiDetailsBean> data) {
        super(context, data);
    }

    @Override
    protected void convert(ViewHolder holder, ChuZhiDetailsBean item, int position) {
        holder.setText(R.id.tv_date,item.date);
        holder.setText(R.id.tv_balance,"账户余额："+item.account);
        holder.setText(R.id.tv_num,item.money);
        holder.setText(R.id.tv_order_num,"订单号："+item.order_sn);
    }

    @Override
    protected int getItemViewLayoutId(int position, ChuZhiDetailsBean item) {
        return R.layout.item_chuzhi_details;
    }
}
